package operator;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;


public class Operator {
	public static void main(String[] args) {
		Runtime r = Runtime.getRuntime();
		try {
			String ip = " www.baidu1.com";
			Integer port = 80;
			Process p = r.exec("utils/tcping64.exe "+ip+" "+port);
			InputStream is = p.getInputStream();
			
			
			File file = new File("D:/tcpingTest.txt");
			byte[] b = new byte[1024];
			int len = 0;
			while((len = is.read(b))>0){
				System.out.println(new String(b,"GBK"));
			}
			
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
